// Type definitions for node-fzf

declare module 'node-fzf' {
  export = NFzf

  declare function NFzf(opts: NFzf.Options): Promise<NFzf.NFzfResult>;

  declare namespace NFzf {
    export interface Options {
      list: string[];
      mode?: 'fuzzy' | 'normal';
      prefill: string;
      prelinehook: (index: number) => string;
      postlinehook: (index: number) => string;
    }

    export interface NFzfResult {
      query: string;
      selected: {
        value: string;
        index: number;
      }
    }
  }
}


